Integrate Custom Endpoints
Authentication
Presently, Custom Endpoints can only be accessed by API keys associated with the team that created and owns the Endpoint. We're planning on changing this in the future - stay tuned!
API Key
Before proceeding, we need to authenticate ourselves with Transpose. To access any Transpose API, you'll need an API key. All API requests should include your API key in an X-API-KEY
header. If you haven't already, you'll need to sign up and create a team (for free!). Once you have a team, you can find a list of your API keys in your team dashboard. When you have your API key, replace <YOUR-API-KEY>
in the interactive examples below with your key.
Remember not to share your API key! Your API key is a secret, and should not be stored or exposed in a public manner.
Calling Custom Endpoints
Custom Endpoints can be called using a GET request to the endpoint's URL. You can find the endpoint's URL by selecting the endpoint from the 'My Endpoints' tab in the Playground, and copying the URL from the 'Endpoint URL' field.
From the Playground, you can also generate code snippets in the language of your choice, by clicking the 'Generate Code Snippet' button.
By default, the URL displayed and the generated code snippets will include the default parameters for the latest version of this endpoint. You can learn more about parameterizing custom endpoints by clicking the link below.
Parameterize Endpoints
Learn how to add parameters to your endpoint, and call the endpoint with parameters in production.
Calling Specific Versions of an Endpoint
By default, calling an endpoint will execute the latest version of the endpoint. For example, let's say that you've created the endpoint my-special-endpoint
, and over time you've updated this endpoint, such that you now have three versions.
You can call the latest version of this endpoint by calling the endpoint's URL, without any version number (remember to pass your API key in the X-API-Key
header)
curl https://api.transpose.io/endpoint/my-special-endpoint -H "X-API-Key: your-api-key"
However, if you want to call a specific version of the endpoint, you can do so by appending the version number to the endpoint's URL. For example, the following would get the first version of the endpoint (we use 1-indexing, instead of 0-indexing, so the first version of the endpoint is version 1).
curl https://api.transpose.io/endpoint/my-special-endpoint/1 -H "X-API-Key: your-api-key"
Or, version 2:
curl https://api.transpose.io/endpoint/my-special-endpoint/2 -H "X-API-Key: your-api-key"
Response Behaviour
Custom Endpoint Response Formats
Learn about Custom Endpoint response structures and status code.
Limitations
The same limitations on API access apply to Custom Endpoints. To view these limits for your tier, visit our pricing and tiers page here.
Got questions? Join our Discord
Discord is the primary home of the Transpose developer community. Join us to ask questions, share your work, and get help.