Skip to content
Current

The Current API is not open yet. These pages describe how it works; you can't create keys or connect apps until it opens.

API reference: companies

Find a customer company by name and read its contact details and primary contact. Never money.

Last updated

Company endpoints need customers:read. They return contact details only, never contracts, prices or costs. Every sample reads the key from CURRENT_API_KEY and calls https://api.current.day/v1.

GET/v1/companies

Needs the customers:read scope.

Finds up to 10 companies this agent can see whose name contains the words, as id and name. It never changes anything and never shows money.

Parameters

Query parameters

querytext, up to 200 charactersRequired
Words in the company's name.

Errors

Errors this endpoint can answer
StatusCode and meaning
400bad_requestThe request was not in the expected shape.
401unauthorizedThis token was not accepted.
403not_allowed, frozen, module_offThis agent is not allowed to do that. This workspace is read only right now, so nothing can be changed. The API is not switched on for this workspace.
404not_foundNothing was found with that id, or this agent cannot see it.
405bad_request (method_not_allowed)That address does not accept this method. The Allow header lists the ones it does.
429rate_limited, send_cappedToo many requests from this token. Wait, then try again. This token has sent its limit of customer emails for now. Try again later.
503degradedCurrent is busy. Try again in a minute.
Request
curl -sS --fail-with-body "https://api.current.day/v1/companies?query=Lakeshore" \
  -H "Authorization: Bearer $CURRENT_API_KEY"
# A refusal exits non-zero and prints the error: read .error.code and .error.reason,
# for example with jq -r '.error.code, .error.reason'
200 answer · a list
{
  "data": [
    {
      "id": "c2e9a0f4-1b7d-4c35-a8e6-5d3f7b1c9e02",
      "name": {
        "untrusted_text": "Lakeshore Dental",
        "source": "customer"
      }
    }
  ]
}
GET/v1/companies/{company_id}

Needs the customers:read scope.

Reads a company's contact details, its primary contact and, when a ticket is named, the person who raised it. It never changes anything and never shows money.

Parameters

Path parameters

company_iduuidRequired
The company's id (read it with Find companies).

Query parameters

ticket_iduuidOptional
A ticket on this company. Adds the person who raised it to the answer.

Errors

Errors this endpoint can answer
StatusCode and meaning
400bad_requestThe request was not in the expected shape.
401unauthorizedThis token was not accepted.
403not_allowed, frozen, module_offThis agent is not allowed to do that. This workspace is read only right now, so nothing can be changed. The API is not switched on for this workspace.
404not_foundNothing was found with that id, or this agent cannot see it.
405bad_request (method_not_allowed)That address does not accept this method. The Allow header lists the ones it does.
429rate_limited, send_cappedToo many requests from this token. Wait, then try again. This token has sent its limit of customer emails for now. Try again later.
503degradedCurrent is busy. Try again in a minute.
Request
curl -sS --fail-with-body "https://api.current.day/v1/companies/c2e9a0f4-1b7d-4c35-a8e6-5d3f7b1c9e02" \
  -H "Authorization: Bearer $CURRENT_API_KEY"
# A refusal exits non-zero and prints the error: read .error.code and .error.reason,
# for example with jq -r '.error.code, .error.reason'
200 answer · one record
{
  "data": {
    "company": {
      "company_id": "c2e9a0f4-1b7d-4c35-a8e6-5d3f7b1c9e02",
      "company_name": {
        "untrusted_text": "Lakeshore Dental",
        "source": "customer"
      },
      "phone": {
        "untrusted_text": "(555) 010-4477",
        "source": "customer"
      },
      "website": {
        "untrusted_text": "lakeshore-dental.example.test",
        "source": "customer"
      },
      "city": {
        "untrusted_text": "Exampleton",
        "source": "customer"
      },
      "is_customer": true,
      "contact_id": "d9c4a7e2-5f18-4b63-8e07-1a6c3f9d2b85",
      "contact_name": {
        "untrusted_text": "Dana Whitfield",
        "source": "customer"
      },
      "contact_email": {
        "untrusted_text": "dana@lakeshore-dental.example.test",
        "source": "customer"
      },
      "contact_title": {
        "untrusted_text": "Office manager",
        "source": "customer"
      }
    }
  }
}
Was this helpful?