Skip to main content
There is no official SafarAPI SDK yet. The contract is the OpenAPI 3.1 specification — everything below is generated from it:
https://developers.safarapi.com/api-reference/openapi.yaml
The spec is the single source of truth. Generated clients are a convenience, not a supported artifact — pin the spec version and regenerate on each release (see the changelog).

Postman

There is no separate Postman collection to download by design — the OpenAPI spec is the collection. Postman imports it natively and keeps it in sync, so it never drifts from the contract (a checked-in collection would).
  1. Postman → ImportLink → paste:
    https://developers.safarapi.com/api-reference/openapi.yaml
    
    This generates a collection covering every endpoint.
  2. Create an environment with two variables:
    • baseUrl = https://api.safarapi.com/api/partner/v1
    • apiKey = your sk_test_… sandbox key
  3. Collection Authorization → type Bearer Token → value {{apiKey}}.
  4. For production writes, add the X-Timestamp / X-Signature headers per Authentication. Sandbox keys skip signing.
  5. After each release, re-run the import (Postman updates the collection in place) so new endpoints and fields appear.

Generated clients

openapi-generator-cli produces a typed client in most languages:
npx @openapitools/openapi-generator-cli generate \
  -i https://developers.safarapi.com/api-reference/openapi.yaml \
  -g <generator> \
  -o ./safarapi-client
Stack-g value
TypeScript (fetch)typescript-fetch
Javajava
Kotlinkotlin
Pythonpython
C#csharp
Gogo
PHPphp
Generators do not produce the HMAC request signing required for production writes — implement it from the snippets in Authentication and wrap the generated client.

Support

Bugs in the spec (wrong schema, missing field): support@safarapi.com with a request_id. Issues in generated code are out of scope — report the spec defect instead, and we fix the contract.