Quickstart
This page takes you from zero to your first API response in a few minutes.
-
Make an API key.
In Shypr, open Settings → API keys and click Create API Key. Give it a name, a scope and an expiry date. Copy the key: Shypr shows it only once. A key starts with
sh_.You need the manager or admin role in the workspace to make a key.
-
Read your customers with GraphQL.
Terminal window curl https://api.shypr.app/graphql \-H "X-API-KEY: $SHYPR_API_KEY" \-H "Content-Type: application/json" \-d '{"query":"{ customers(itemsPerPage: 5) { collection { uid name reference } paginationInfo { totalCount } } }"}'const response = await fetch('https://api.shypr.app/graphql', {method: 'POST',headers: {'X-API-KEY': process.env.SHYPR_API_KEY,'Content-Type': 'application/json',},body: JSON.stringify({query: `{customers(itemsPerPage: 5) {collection { uid name reference }paginationInfo { totalCount }}}`,}),})const { data } = await response.json()console.log(data.customers.collection)$response = (new GuzzleHttp\Client())->post('https://api.shypr.app/graphql', ['headers' => ['X-API-KEY' => getenv('SHYPR_API_KEY')],'json' => ['query' => '{ customers(itemsPerPage: 5) { collection { uid name reference } paginationInfo { totalCount } } }',],]);$data = json_decode((string) $response->getBody(), true)['data']; -
Read the answer.
{"data": {"customers": {"collection": [{ "uid": "01936f6e-2b1c-7a4e-9c1d-3f5e8a2b7c90", "name": "Acme B.V.", "reference": "C-0001" }],"paginationInfo": { "totalCount": 1 }}}}
Next steps
Section titled “Next steps”- Authentication: scopes, expiry and how to keep a key safe.
- GraphQL: pagination, filters and sorting.
- REST reference: the endpoints that create and change records.
- Webhooks: get a call when a record changes.