SendGrid · Capability

Twilio SendGrid Marketing Campaigns Contacts API — Contacts

Twilio SendGrid Marketing Campaigns Contacts API — Contacts. 15 operations. Lead operation: Add or Update a Contact. Self-contained Naftiko capability covering one Sendgrid business surface.

Run with Naftiko SendgridContacts

What You Can Do

PUT
Updatecontact — Add or Update a Contact
/v1/v3/marketing/contacts
DELETE
Deletecontact — Delete Contacts
/v1/v3/marketing/contacts
GET
Listcontact — Get Sample Contacts
/v1/v3/marketing/contacts
POST
Listbatchedcontact — Get Batched Contacts by IDs
/v1/v3/marketing/contacts/batch
GET
Listcontactcount — Get Total Contact Count
/v1/v3/marketing/contacts/count
POST
Exportcontact — Export Contacts
/v1/v3/marketing/contacts/exports
GET
Listexportcontact — Get All Existing Exports
/v1/v3/marketing/contacts/exports
GET
Getexportcontact — Export Contacts Status
/v1/v3/marketing/contacts/exports/{id}
PUT
Importcontact — Import Contacts
/v1/v3/marketing/contacts/imports
GET
Getimportcontact — Import Contacts Status
/v1/v3/marketing/contacts/imports/{id}
POST
Searchcontact — Search Contacts
/v1/v3/marketing/contacts/search
POST
Listcontactbyemail — Get Contacts by Emails
/v1/v3/marketing/contacts/search/emails
POST
Getcontactbyidentifiers — Get Contacts by Identifiers
/v1/v3/marketing/contacts/search/identifiers/{identifier-type}
DELETE
Deletecontactidentifier — Delete a Contact Identifier
/v1/v3/marketing/contacts/{contact-id}/identifiers
GET
Getcontact — Get a Contact by ID
/v1/v3/marketing/contacts/{id}

MCP Tools

add-update-contact

Add or Update a Contact

idempotent
delete-contacts

Delete Contacts

idempotent
get-sample-contacts

Get Sample Contacts

read-only idempotent
get-batched-contacts-ids

Get Batched Contacts by IDs

read-only
get-total-contact-count

Get Total Contact Count

read-only idempotent
export-contacts

Export Contacts

get-all-existing-exports

Get All Existing Exports

read-only idempotent
export-contacts-status

Export Contacts Status

read-only idempotent
import-contacts

Import Contacts

idempotent
import-contacts-status

Import Contacts Status

read-only idempotent
search-contacts

Search Contacts

read-only
get-contacts-emails

Get Contacts by Emails

read-only
get-contacts-identifiers

Get Contacts by Identifiers

read-only
delete-contact-identifier

Delete a Contact Identifier

idempotent
get-contact-id

Get a Contact by ID

read-only idempotent

Capability Spec

tsg_mc_contacts_v3-contacts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Twilio SendGrid Marketing Campaigns Contacts API — Contacts
  description: 'Twilio SendGrid Marketing Campaigns Contacts API — Contacts. 15 operations. Lead operation: Add or Update
    a Contact. Self-contained Naftiko capability covering one Sendgrid business surface.'
  tags:
  - Sendgrid
  - Contacts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SENDGRID_API_KEY: SENDGRID_API_KEY
capability:
  consumes:
  - type: http
    namespace: tsg_mc_contacts_v3-contacts
    baseUri: https://api.sendgrid.com
    description: Twilio SendGrid Marketing Campaigns Contacts API — Contacts business capability. Self-contained, no shared
      references.
    resources:
    - name: v3-marketing-contacts
      path: /v3/marketing/contacts
      operations:
      - name: updatecontact
        method: PUT
        description: Add or Update a Contact
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: deletecontact
        method: DELETE
        description: Delete Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: delete_all_contacts
          in: query
          type: string
          description: Must be set to `"true"` to delete all contacts.
        - name: ids
          in: query
          type: string
          description: A comma-separated list of contact IDs.
      - name: listcontact
        method: GET
        description: Get Sample Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-contacts-batch
      path: /v3/marketing/contacts/batch
      operations:
      - name: listbatchedcontact
        method: POST
        description: Get Batched Contacts by IDs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v3-marketing-contacts-count
      path: /v3/marketing/contacts/count
      operations:
      - name: listcontactcount
        method: GET
        description: Get Total Contact Count
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-contacts-exports
      path: /v3/marketing/contacts/exports
      operations:
      - name: exportcontact
        method: POST
        description: Export Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: listexportcontact
        method: GET
        description: Get All Existing Exports
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-contacts-exports-id
      path: /v3/marketing/contacts/exports/{id}
      operations:
      - name: getexportcontact
        method: GET
        description: Export Contacts Status
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-contacts-imports
      path: /v3/marketing/contacts/imports
      operations:
      - name: importcontact
        method: PUT
        description: Import Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v3-marketing-contacts-imports-id
      path: /v3/marketing/contacts/imports/{id}
      operations:
      - name: getimportcontact
        method: GET
        description: Import Contacts Status
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v3-marketing-contacts-search
      path: /v3/marketing/contacts/search
      operations:
      - name: searchcontact
        method: POST
        description: Search Contacts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v3-marketing-contacts-search-emails
      path: /v3/marketing/contacts/search/emails
      operations:
      - name: listcontactbyemail
        method: POST
        description: Get Contacts by Emails
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v3-marketing-contacts-search-identifiers-identifier_type
      path: /v3/marketing/contacts/search/identifiers/{identifier_type}
      operations:
      - name: getcontactbyidentifiers
        method: POST
        description: Get Contacts by Identifiers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v3-marketing-contacts-contact_id-identifiers
      path: /v3/marketing/contacts/{contact_id}/identifiers
      operations:
      - name: deletecontactidentifier
        method: DELETE
        description: Delete a Contact Identifier
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: contact_id
          in: path
          type: string
          description: Must be set to the `contact_id` of the contact you want to remove the identifier from.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v3-marketing-contacts-id
      path: /v3/marketing/contacts/{id}
      operations:
      - name: getcontact
        method: GET
        description: Get a Contact by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SENDGRID_API_KEY}}'
  exposes:
  - type: rest
    namespace: tsg_mc_contacts_v3-contacts-rest
    port: 8080
    description: REST adapter for Twilio SendGrid Marketing Campaigns Contacts API — Contacts. One Spectral-compliant resource
      per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/v3/marketing/contacts
      name: v3-marketing-contacts
      description: REST surface for v3-marketing-contacts.
      operations:
      - method: PUT
        name: updatecontact
        description: Add or Update a Contact
        call: tsg_mc_contacts_v3-contacts.updatecontact
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecontact
        description: Delete Contacts
        call: tsg_mc_contacts_v3-contacts.deletecontact
        with:
          delete_all_contacts: rest.delete_all_contacts
          ids: rest.ids
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listcontact
        description: Get Sample Contacts
        call: tsg_mc_contacts_v3-contacts.listcontact
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/batch
      name: v3-marketing-contacts-batch
      description: REST surface for v3-marketing-contacts-batch.
      operations:
      - method: POST
        name: listbatchedcontact
        description: Get Batched Contacts by IDs
        call: tsg_mc_contacts_v3-contacts.listbatchedcontact
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/count
      name: v3-marketing-contacts-count
      description: REST surface for v3-marketing-contacts-count.
      operations:
      - method: GET
        name: listcontactcount
        description: Get Total Contact Count
        call: tsg_mc_contacts_v3-contacts.listcontactcount
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/exports
      name: v3-marketing-contacts-exports
      description: REST surface for v3-marketing-contacts-exports.
      operations:
      - method: POST
        name: exportcontact
        description: Export Contacts
        call: tsg_mc_contacts_v3-contacts.exportcontact
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listexportcontact
        description: Get All Existing Exports
        call: tsg_mc_contacts_v3-contacts.listexportcontact
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/exports/{id}
      name: v3-marketing-contacts-exports-id
      description: REST surface for v3-marketing-contacts-exports-id.
      operations:
      - method: GET
        name: getexportcontact
        description: Export Contacts Status
        call: tsg_mc_contacts_v3-contacts.getexportcontact
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/imports
      name: v3-marketing-contacts-imports
      description: REST surface for v3-marketing-contacts-imports.
      operations:
      - method: PUT
        name: importcontact
        description: Import Contacts
        call: tsg_mc_contacts_v3-contacts.importcontact
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/imports/{id}
      name: v3-marketing-contacts-imports-id
      description: REST surface for v3-marketing-contacts-imports-id.
      operations:
      - method: GET
        name: getimportcontact
        description: Import Contacts Status
        call: tsg_mc_contacts_v3-contacts.getimportcontact
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/search
      name: v3-marketing-contacts-search
      description: REST surface for v3-marketing-contacts-search.
      operations:
      - method: POST
        name: searchcontact
        description: Search Contacts
        call: tsg_mc_contacts_v3-contacts.searchcontact
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/search/emails
      name: v3-marketing-contacts-search-emails
      description: REST surface for v3-marketing-contacts-search-emails.
      operations:
      - method: POST
        name: listcontactbyemail
        description: Get Contacts by Emails
        call: tsg_mc_contacts_v3-contacts.listcontactbyemail
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/search/identifiers/{identifier-type}
      name: v3-marketing-contacts-search-identifiers-identifier-type
      description: REST surface for v3-marketing-contacts-search-identifiers-identifier_type.
      operations:
      - method: POST
        name: getcontactbyidentifiers
        description: Get Contacts by Identifiers
        call: tsg_mc_contacts_v3-contacts.getcontactbyidentifiers
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/{contact-id}/identifiers
      name: v3-marketing-contacts-contact-id-identifiers
      description: REST surface for v3-marketing-contacts-contact_id-identifiers.
      operations:
      - method: DELETE
        name: deletecontactidentifier
        description: Delete a Contact Identifier
        call: tsg_mc_contacts_v3-contacts.deletecontactidentifier
        with:
          contact_id: rest.contact_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v3/marketing/contacts/{id}
      name: v3-marketing-contacts-id
      description: REST surface for v3-marketing-contacts-id.
      operations:
      - method: GET
        name: getcontact
        description: Get a Contact by ID
        call: tsg_mc_contacts_v3-contacts.getcontact
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: tsg_mc_contacts_v3-contacts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Twilio SendGrid Marketing Campaigns Contacts API — Contacts. One tool per consumed operation,
      routed inline through this capability's consumes block.
    tools:
    - name: add-update-contact
      description: Add or Update a Contact
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.updatecontact
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-contacts
      description: Delete Contacts
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.deletecontact
      with:
        delete_all_contacts: tools.delete_all_contacts
        ids: tools.ids
      outputParameters:
      - type: object
        mapping: $.
    - name: get-sample-contacts
      description: Get Sample Contacts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.listcontact
      outputParameters:
      - type: object
        mapping: $.
    - name: get-batched-contacts-ids
      description: Get Batched Contacts by IDs
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: tsg_mc_contacts_v3-contacts.listbatchedcontact
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-total-contact-count
      description: Get Total Contact Count
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.listcontactcount
      outputParameters:
      - type: object
        mapping: $.
    - name: export-contacts
      description: Export Contacts
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: tsg_mc_contacts_v3-contacts.exportcontact
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-existing-exports
      description: Get All Existing Exports
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.listexportcontact
      outputParameters:
      - type: object
        mapping: $.
    - name: export-contacts-status
      description: Export Contacts Status
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.getexportcontact
      outputParameters:
      - type: object
        mapping: $.
    - name: import-contacts
      description: Import Contacts
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.importcontact
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: import-contacts-status
      description: Import Contacts Status
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.getimportcontact
      outputParameters:
      - type: object
        mapping: $.
    - name: search-contacts
      description: Search Contacts
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: tsg_mc_contacts_v3-contacts.searchcontact
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-contacts-emails
      description: Get Contacts by Emails
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: tsg_mc_contacts_v3-contacts.listcontactbyemail
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-contacts-identifiers
      description: Get Contacts by Identifiers
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: tsg_mc_contacts_v3-contacts.getcontactbyidentifiers
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-contact-identifier
      description: Delete a Contact Identifier
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.deletecontactidentifier
      with:
        contact_id: tools.contact_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-contact-id
      description: Get a Contact by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: tsg_mc_contacts_v3-contacts.getcontact
      outputParameters:
      - type: object
        mapping: $.