Skip to main content
POST
/
segments
/
{id}
/
members
Add static segment members
curl --request POST \
  --url https://api.mailglyph.com/segments/{id}/members \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "emails": [
    "alice@example.com",
    "bob@example.com"
  ]
}
'
{
  "added": 123,
  "notFound": [
    "jsmith@example.com"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.mailglyph.com/llms.txt

Use this file to discover all available pages before exploring further.

Adds one or more existing workspace contacts to a static segment.

Path parameters

  • id (string, required): Segment ID

Request body

{
  "emails": ["alice@example.com", "bob@example.com"]
}
  • emails must be a non-empty array of valid email addresses.
  • Maximum length is 500 emails per request.

Response

{
  "added": 2,
  "notFound": []
}
  • added: Number of emails that matched contacts in the workspace.
  • notFound: Input emails that were not found in the workspace.

Notes

  • This endpoint only works for STATIC segments.
  • Calling it for a DYNAMIC segment returns 400.

Authorizations

Authorization
string
header
required

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. Workspaces can have multiple active keys, and sender-domain operations enforce per-key domain scope when configured.

Path Parameters

id
string
required

Body

application/json
emails
string<email>[]
required
Required array length: 1 - 500 elements

Response

Contacts added to static segment

added
integer
notFound
string<email>[]