Postcards
reading time 5 minutes
This API endpoint uses an HTTP POST request. You must provide api_token within the body, which can be found under the Settings section in the Inkit application (see below).
Postcard Webhook Endpoint: https://internal.inkit.io/integrations/webhook
curl --header "Content-Type: application/json" -d
'{
"api_token":"<token>",
"template_id":"<template_id>",
"first_name": "Elon",
"last_name": "Musk",
"email":"[email protected]",
"company":"SpaceX",
"phone":"3107099497",
"address_line_1": "1 Rocket Road",
"address_line_2": "Suite 1",
"address_city": "Hawthorne",
"address_state": "CA",
"address_zip": "90250",
"address_country": "US",
"source": "Webhook"
}'
-H "Content-Type: application/json" -X POST https://internal.inkit.io/integrations/webhook
Note
Any field that doesn't exist in the data structure will be stored as custom data.
Custom data can be used for displaying dynamic data if the merge fields are selected in the template.
Request Schema
Field Type Description api_tokenstring Authorization token which allow to use API calls (see below) template_idstring ID of the template from the Inkit UI (see below) first_namestring The first name of the contact (optional but either first_name or last_name is required) last_namestring The last name of the contact (optional but either first_name or last_name is required) string The email address of the contact (optional) companystring The company name that the contact belongs to (optional) phonestring The phone number of the contact (optional) address_line_1string The primary line, or street address of the contact (64-character limit) address_line_2string The apartment or suite number (optional) address_citystring The city of the contact's address address_statestring The two-letter (2) state code of the contact's address address_zipstring The ZIP Code of the contact's address address_countrystring The two-letter (2) ISO alpha-2 country code of the contact's address
API Token and Template ID
1. Template ID is located and can be copied under the Templates section in the app.
Templates section in the app.
2. API Token
You can find the information how to obtain API token by clicking on this link.
Response
202 Accepted HTTP response will be returned for successful post request.
Otherwise, you will receive an error message. The meaning of them you can find here.
Questions?
We're happy to help get your code set up or answer questions you might have.
Search our documentation, check the help center, or connect with our sales team.
Ask our support team ([email protected]) questions if you run into any technical roadblocks.
Updated 6 months ago