Get attribute definition

Get attribute definition

Get the specified attribute definition from the schema given its key.

GEThttps://api.bird.com/workspaces/{workspaceId}/attribute-definitions/{attributeDefinitionKey}
Path parameters
workspaceId*string (uuid)

Your workspace identifier.

Example: "b4e02c85-c6d2-4b15-8885-e09671799c61"
attributeDefinitionKey*string

The key of an attribute definition.

Example: "company"
Response

The attribute definition was returned successfully.

Body
idstring

The UUID, primarily for internal reference

Example: "123e4567-e89b-12d3-a456-426614174000"
keystring

A user-specified key, primarily for client reference.

Example: "countryCode"
displayNamestring

A human-readable name of the attribute.

Example: "Country Code"
descriptionstring

A user-friendly description of the attribute.

Example: "The country code of the contact."
cardinalityenum

The cardinality configures how many values belong to the single key.

onemany
typeenum

The data type of the attribute.

booleandatetimenumberstring
formatContacts_AttributeFormat (object)
piiboolean

A flag to indicate whether this attribute is considered personally identifiable information.

Example: false
readOnlyboolean

A flag to indicate whether this attribute may be updated after creation.

Example: false
builtinboolean

A flag to indicate whether this attribute is built-in. Built-in attributes are system-defined and cannot be updated or deleted by end-users.

Example: false
archivedboolean

A flag to indicate whether this attribute is archived.

Example: false
indexMappingContacts_AttributeIndexMapping (object)
createdAtstring (date-time)
updatedAtstring (date-time)
versionnumber

The version number of the attribute definition.

Example: 1
aclarray of Contacts_AttributeDefinitionAcl (object)

An array of ACLs that define the access control for this attribute

Request
const response = await fetch('https://api.bird.com/workspaces/{workspaceId}/attribute-definitions/{attributeDefinitionKey}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "key": "countryCode",
  "displayName": "Country Code",
  "description": "The country code of the contact.",
  "cardinality": "one",
  "type": "boolean",
  "format": {
    "type": "emailAddress"
  },
  "pii": false,
  "readOnly": false,
  "builtin": false,
  "archived": false,
  "indexMapping": {
    "fields": [
      {
        "name": "emailaddress-standard",
        "analyzer": "simple",
        "type": "string"
      }
    ]
  },
  "createdAt": "2025-01-21T01:26:40.831Z",
  "updatedAt": "2025-01-21T01:26:40.831Z",
  "version": 1,
  "acl": [
    {
      "roleId": "123e4567-e89b-12d3-a456-426614174000",
      "read": true,
      "write": true
    }
  ]
}

Examples

Let's establish some of our data that will be used in the following examples:

  • Workspace ID: a1405560-c8d3-4b1a-877d-3f449ad95352

  • AccessKey: abcd

  • Attribute Definition Key: countryCode

Get an attribute definition

In this example, we're fetching the attribute definition by its key.

curl -X GET "https://api.bird.com/workspaces/a1405560-c8d3-4b1a-877d-3f449ad95352/attribute-definitions/countryCode" \
-H "Authorization: AccessKey abcd" \
-H "Content-Type: application/json" \

Last updated