Skip to content

Invite workspace member

Viewing v1, superseded by v2

Deprecated
POST
/v1/workspaces/{workspace_id}/members
curl --request POST \
--url https://api.app.layer.ai/api/v1/workspaces/:workspace_id/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "<email>",
"role": "<string>",
"role_id": "<uuid>"
}'

v1 is superseded. v1 was superseded by v2 on 2026-08-26. A sunset date has not been announced yet; v1 will be deprecated as a whole before removal. Migrate with the v2 migration guide.

Add an email address as a member at once, creating a Layer user if none exists. Deprecated: use createWorkspaceInvite, which emails the address an invitation to accept.

workspace_id
required
Workspace ID

ID of the workspace that owns the resource.

string format: uuid

ID of the workspace that owns the resource.

Idempotency-Key
string
<= 255 characters

Opaque key making a retry of this request return the first result. A 2xx response is replayed for 24 hours with Idempotent-Replayed: true. A 4xx releases the key. A 5xx, or a request still running, holds the key for 120 seconds, during which a retry gets 409; after that a retry executes again. The key covers the method, path, query, and byte-identical body it was first used with; reusing it for a different request is rejected with 422. Protection is best effort: if the key store is unavailable, or a record is lost early, a retry can execute again even after an earlier 409. See the Idempotency section of the API description.

Media typeapplication/json
InviteMemberBody
object
email
required
Email

Email of the person to invite. A Layer user is created if none exists.

string format: email
role
Role

The built-in role to grant, by key: admin or creator, plus member in an enterprise workspace. Deprecated: use role_id.

string
nullable
role_id
Role ID

ID of the role to grant, custom included. Defaults to creator, or member in an enterprise workspace.

string format: uuid
nullable
Examplegenerated
{
"email": "hello@example.com",
"role": "example",
"role_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Successful Response

Media typeapplication/json
MemberOutput
object
membership_id
required
Membership ID

The workspace membership’s unique identifier.

string format: uuid
principal_id
required
Principal ID

The member’s principal id: for a person, the same as their user id.

string format: uuid
user_id
required
User ID

The member’s user id. Deprecated: use principal_id.

string format: uuid
email
required
Email

The member’s email address.

string
name
Name

The member’s display name, if set.

string
nullable
role
required
Role

The member’s built-in role, by key; member for a custom role. Deprecated: use role_id.

string
role_id
required
Role ID

ID of the role the member holds, custom included.

string format: uuid
role_name
required
Role Name

The name of the role the member holds.

string
status
required
WorkspaceMembershipStatus

Membership status: active or suspended.

string
Allowed values: active suspended
Example
{
"status": "active"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

The outcome of the request with this Idempotency-Key is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

Invalid input parameters, or an Idempotency-Key reused for a different request.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

Rate limited — retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}
Deprecation
string
Example
@1798761600

Present only on a deprecated operation: the moment it became deprecated, as an RFC 9745 sf-date (@<unix-timestamp>). The operation still works.

Sunset
string
Example
Sat, 01 Aug 2026 00:00:00 GMT

Present only on a deprecated operation: the earliest date it may stop responding, as an RFC 8594 IMF-fixdate. Treat it as the migration deadline.

Link
string

On a deprecated operation, carries rel="deprecation" pointing at the policy and rel="successor-version" pointing at the replacement.