Spaces

A space is a separate Personas environment. Consider the two main reasons you might use spaces:

  • To separate your development and production environments (highly recommended)
  • To separate environments for distinct teams or geographical regions

Batch Query Messaging Subscriptions for Space

Get Messaging Subscriptions for space.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

• In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
Request Body schema: application/vnd.segment.v1alpha+json
required
required
Array of objects (subscriptions)

A list of subscriptions to retrieve subscription status.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

post/spaces/{spaceId}/messaging-subscriptions/batch
Request samples
application/vnd.segment.v1alpha+json
{
  • "subscriptions": [
    ]
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Get Space

Returns the Space by id.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

• In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces/{spaceId}
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.spaces.getSpace('9aQ1Lj62S4bomZKLF4DPqW'))
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

List Spaces

List Spaces.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

• In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information.

Securitytoken
Request
query Parameters
object (PaginationInput)

Pagination params

This parameter exists in alpha.

Example: pagination=pagination.count=200
Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

get/spaces
Request samples
import { configureApis, unwrap } from '@segment/public-api-sdk-typescript'

const api = configureApis('/* Insert your Public API token here */')

try {
  const result = await unwrap(api.spaces.listSpaces())
  console.log(JSON.stringify(result))
} catch (e) {
  console.log('ERROR:', e)
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}

Replace Messaging Subscriptions in Spaces

Replace Messaging Subscriptions in Spaces.

• This endpoint is in Alpha testing. Please submit any feedback by sending an email to friends@segment.com.

• In order to successfully call this endpoint, the specified Workspace needs to have the Spaces feature enabled. Please reach out to your customer success manager for more information.

The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.

Securitytoken
Request
path Parameters
spaceId
required
string [ 1 .. 255 ]
Example: 9aQ1Lj62S4bomZKLF4DPqW
Request Body schema: application/vnd.segment.v1alpha+json
required
required
Array of objects (subscriptions)

An array of subscriptions.

Responses
200

OK

404

Resource not found

422

Validation failure

429

Too many requests

put/spaces/{spaceId}/messaging-subscriptions
Request samples
application/vnd.segment.v1alpha+json
{
  • "subscriptions": [
    ]
}
Response samples
application/vnd.segment.v1alpha+json
{
  • "data": {
    }
}