Make Your First Request

Make your first request

This API supports both JSON and XML. To request or post JSON, include the following in your headers:

Content-Type: application/json Accept: application/json For XML, change those to application/xml.

For this example, we will use JSON and will search for companies with the word "Microsoft" in the name.

  1. Set the request URL
    POST https://uapi.demandbase.com/data/b2b/v1/companies
  2. Set your headers
    Content-Type: application/json
    Accept: application/json
    Authorization: Bearer your_jwt_token	
  3. Define your body
    {
        "page":1,
        "perPage": 50,
        "name": "Microsoft"
    }
  4. Resulting cURL
    curl --location 'https://uapi.demandbase.com/data/b2b/v1/companies' \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer your_jwt_token' \
    --data '{
        "page":1,
        "perPage": 50,
        "name": "Microsoft"
    }'
  5. Response: HTTP status 200
    {
        "companies": [
            {
                "name": "Microsoft Corp",
                "city": "Redmond",
                "state": "WA",
                "country": "US",
                "companyId": 726263
            },
          	{...} //Truncated for this example
        ],
        "totalCount": 1257,
        "pageNo": 1,
        "pageSize": 50
    }

Give it a try now, make your first request right here !