✒️
Clockwork
  • The Clockwork API
  • Outgoing Webhooks
  • Help
    • Frequently Asked Questions
Powered by GitBook
On this page
  • Getting Started
  • Create/Update customer

Was this helpful?

The Clockwork API

Welcome to the Clockwork API! Here you'll find all the ways you can interact with the Clockwork ecosystem programmatically

Getting Started

In order to use the Clockwork API, you'll need an API token. Contact us for one. Once you have it, it'll look something like this: WHICv_xM.SFMyNTY.g3QAAAACZAAEZGF0YWEBZAAGc2lnbmVkbgYA21AjlnIB.J2z-zY3HYRBoKOwGI-qZkfAmChlC4lO9HxxJ_u5RlIA

In order to make requests to the API, you'll need to put your API token in your request Authorization header. It'll look something like this:

{
    "Authorization": "Bearer <api_token>"
}

Once that's set up, you're ready to start using the API!

Create/Update customer

POST https://app.clockworkhq.com/api/v1/customers

This endpoint allows you to create or update a customer. We key each customer by the email address supplied in the body parameters. If a customer already exists, we will update their name (first and last), and their attributes

Headers

Name
Type
Description

Authorization

string

Api authentication token. Should be in the form of Bearer: <token>

Request Body

Name
Type
Description

email

string

full_name

string

The customer's full name as a single string, e.g. "Brønt Chloaf." We will parse this out as first_name and last_name

first_name

string

The customer's first name

last_name

string

The customer's last name

{message: "Success"}
{"message": "Could not validate - API key may be malformed or invalid"}
{"message": "Error - customer was not created. Reason: <error_reason>"}

Any additional parameters you add to the body other than first_name, last_name, full_name, and email will be automatically added to the list of the customer's attributes.

NextOutgoing Webhooks

Last updated 5 years ago

Was this helpful?