Basics
Introduction to the Clerk.io API.
The Clerk.io API is a REST-like API where both GET
, POST
, PATCH
and DELETE
can be used to send requests, depending on the endpoint.
Each request should contain an API version, the endpoint, and, optionally, the arguments for that endpoint.
The version is always v2
and should be the first part of the URL path. The endpoint is the remainder of the URL path. The arguments are either sent as query parameters for GET
requests, or as a JSON encoded object for POST
requests.
For complex query parameters in GET
requests (lists, objects etc), the parameter value should be JSON encoded or else it will be treated as a string.
The response from the API is always a JSON encoded data-structure.
curl https://api.clerk.io/v2/some/endpoint?arg1=bar&arg2=42
{
"status": "ok"
}
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"arg1":"bar",
"arg2": 42
}' \
http://api.clerk.io/v2/some/endpoint
{
"status": "ok"
}
See all avaliable API endpoints avaliable in our API Reference.
Updated 10 months ago