Docs
On this page
task2 min readApplication: Platform Integration

Quick start

Authenticate with a System API token and read your first records from the Servicely REST API.

Make your first call to the REST API: authenticate with a token, read a page of records and check the paging headers. Do this before you build an integration, to confirm the token, the user and the network path work.

Before you begin

  • An administrator with the api_token_administrator or administrator role has created a System API token for you with the validation type None (Bearer token in Header). See Create a System API token in the Administrator guide.
  • The token’s Impersonate user can read the User table. Every request runs as this user.
  • If the token has Allowed Scopes, they include REST API (v1).
  • You know your instance URL, for example https://<instance>.servicely.ai.
  • You have an HTTP client. The examples use curl.

Steps

  1. Store the token in an environment variable so it stays out of your shell history and scripts.

    export SERVICELY_TOKEN='<token>'
    
  2. Request one user record. Send the token in the Authorization header with the Bearer scheme.

    curl -i "https://<instance>.servicely.ai/v1/User?fields=id,Name&page_size=1" \
      -H "Authorization: Bearer $SERVICELY_TOKEN"
    
  3. Check the status line. A 200 means the call worked. A 401 means the token was not accepted: check the header and that the token is active. A 404 means no record matched.

  4. Read the body. The records are in the data array, with only the fields you named in fields.

    {
        "data": [
            {
                "Name": "<user name>",
                "id": "00000000000000000000000000000110"
            }
        ]
    }
    
  5. Read the paging headers. X-Total-Result-Count is the number of matching records and X-Result-More: true means more pages follow.

    X-Page: 1
    X-Page-Size: 1
    X-Result-Count: 1
    X-Result-More: true
    X-Total-Result-Count: 14
    
  6. Fetch the same record by its ID to read a single record. The data key now holds one object instead of an array.

    curl "https://<instance>.servicely.ai/v1/User/00000000000000000000000000000110?fields=id,Name,Email" \
      -H "Authorization: Bearer $SERVICELY_TOKEN"
    

Result

You have read records through the REST API as the token’s user. The same URL pattern, /v1/<Table> and /v1/<Table>/<id>, serves every table the user can read.

Basic authentication with a username and password also works, unless an administrator has turned it off. For requests that must prove they were not changed in transit, sign them with HMAC instead of sending a bearer token.

Last updated 18 October 2026commit f37120b6b82bChris Jones
Back to top