SendGrid

Twilio SendGrid Marketing Campaigns Contacts API

The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export…

Communication#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the Lists API and Segments API.

You can also manage your marketing contacts with the Marketing Campaigns application user interface. See How to Send Email with New Marketing Campaigns for more information.

Endpoints 15

Contacts

  • GETGet Sample Contacts/v3/marketing/contactsThis endpoint will return up to 50 of the most recent contacts uploaded or attached to a list. This list will then be sorted by email address. The full…
  • PUTAdd or Update a Contact/v3/marketing/contactsThis endpoint allows the upsert (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower. Because the creation and update of contacts…
  • DELETEDelete Contacts/v3/marketing/contacts?delete_all_contacts=string&ids=stringThis endpoint can be used to delete one or more contacts. The query parameter ids must set to a comma-separated list of contact IDs for bulk contact deletion.…
  • GETGet a Contact by ID/v3/marketing/contacts/:idThis endpoint returns the full details and all fields for the specified contact. The "Get Contacts by Identifier" endpoint can be used to get the ID of a…
  • POSTGet Batched Contacts by IDs/v3/marketing/contacts/batchThis endpoint is used to retrieve a set of contacts identified by their IDs. This can be more efficient endpoint to get contacts than making a series of…
  • DELETEDelete a Contact Identifier/v3/marketing/contacts/:contact_id/identifiersThis endpoint can be used to delete one identifier from a contact. Deletion jobs are processed asynchronously. Note this is different from deleting a contact.…
  • GETGet Total Contact Count/v3/marketing/contacts/countThis endpoint returns the total number of contacts you have stored. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues…
  • GETGet All Existing Exports/v3/marketing/contacts/exportsUse this endpoint to retrieve details of all current exported jobs. It will return an array of objects, each of which records an export job in flight or…
  • POSTExport Contacts/v3/marketing/contacts/exportsUse this endpoint to export lists or segments of contacts. If you would just like to have a link to the exported list sent to your email set the…
  • GETExport Contacts Status/v3/marketing/contacts/exports/:idThis endpoint can be used to check the status of a contact export job. To use this call, you will need the id from the "Export Contacts" call. If you would…
  • PUTImport Contacts/v3/marketing/contacts/importsThis endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller. At least one identifier is required for a…
  • GETImport Contacts Status/v3/marketing/contacts/imports/:idThis endpoint can be used to check the status of a contact import job. Use the job_id from the "Import Contacts," "Add or Update a Contact," or "Delete…
  • POSTSearch Contacts/v3/marketing/contacts/searchUse this endpoint to locate contacts. The request body's query field accepts valid SGQL for searching for a contact. Because contact emails are stored in…
  • POSTGet Contacts by Emails/v3/marketing/contacts/search/emailsThis endpoint allows you to retrieve up to 100 contacts matching the searched email address(es), including any alternate_emails. Email addresses are unique to…
  • POSTGet Contacts by Identifiers/v3/marketing/contacts/search/identifiers/:identifier_typeUse this endpoint to retrieve up to 100 contacts that match the requested identifier values for a single identifier type. identifier_type must be a valid…

API details

Base URL
https://api.sendgrid.com
Authentication
A bearer token in the Authorization header
Operations
15 operations on 12 pathsGET 6POST 5PUT 2DELETE 2
Main resources
Contacts 15
Response formats
application/json
Description format
OpenAPI 3.1.0, API version 1.0.0

How to test the Twilio SendGrid Marketing Campaigns Contacts API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Twilio SendGrid Marketing Campaigns Contacts API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses A bearer token in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get Sample Contacts” (GET /v3/marketing/contacts), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Twilio SendGrid Marketing Campaigns Contacts API?

The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export… It is listed under Communication and has 15 endpoints.

Who publishes the Twilio SendGrid Marketing Campaigns Contacts API?

It is listed from SendGrid's public API description (an OpenAPI document), not published by SendGrid on Swastik Codes. Anyone who controls sendgrid.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Twilio SendGrid Marketing Campaigns Contacts API?

Requests go to https://api.sendgrid.com. Endpoint paths are added to this base URL.

How do I authenticate with the Twilio SendGrid Marketing Campaigns Contacts API?

With A bearer token in the Authorization header.

How many endpoints does the Twilio SendGrid Marketing Campaigns Contacts API have?

15 operations on 12 paths (6 GET, 5 POST, 2 PUT, 2 DELETE). The largest groups are Contacts.

Is forking the Twilio SendGrid Marketing Campaigns Contacts API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.