Jump to guide

Testing

Receive predictable responses you can test against.

Sandbox API

We host a sandbox API at https://sandbox.cognitohq.com. The purpose of the sandbox API is to help you become familiar with the API endpoints and response formats. The sandbox server currently returns the same two fictional records for any valid request to /identity_searches.


Asynchronous responses

The /identity_searches endpoint supports the Prefer header with the respond-async option allowing you to force an asynchronous response when creating an identity search. The Prefer header can be used on both live and sandbox servers. We add a Preference-Applied: respond-async header to responses executed with this option.

Example request

POST /identity_searches HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Prefer: respond-async

{
  "data": {
    "type": "identity_search",
    "attributes": {
      "phone": {
        "number": "+16508007985"
      }
    },
    "relationships": {
      "profile": {
        "data": {
          "type": "profile",
          "id": "prf_3s527AoQo6Dw62"
        }
      }
    }
  }
}

Example response

HTTP/1.1 202 Accepted
Content-Type: application/vnd.api+json
Content-Location: /identity_searches/jobs/idsjob_2HLhnV3hMoaFFf
Preference-Applied: respond-async


{
  "data": {
    "type": "identity_search_job",
    "id": "idsjob_2HLhnV3hMoaFFf",
    "attributes": {
      "created_at": "2016-07-18T21:24:18Z",
      "updated_at": "2016-07-18T21:24:18Z",
      "status": "processing"
    },
    "relationships": {
      "identity_search": {
        "data": null
      }
    }
  }
}