Teams
Get, list, create, update, and delete teams, and assign them to users, campaigns, workflows, and boards.
Teams let you organize your Oktopost account by grouping users and resources together. By assigning entities to teams, you can control access, segment reporting, and manage permissions at scale. Teams can contain users, campaigns, workflows, and advocacy boards.
Team assignments control which users can access specific campaigns, workflows, and advocacy boards. Use teams to implement role-based access control across your organization.
Team-Bound Entities
You can assign these entity types to teams:
- Users: control which team members have access to specific resources.
- Campaigns: organize campaigns by team, region, or product line.
- Workflows: assign approval workflows to specific teams.
- Advocacy boards: segment employee advocacy programs by team or department.
Get Team
Retrieve a single team by ID.
GET /v2/team/:teamId
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/team/025000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Team": {
"Id": "025000000000001",
"Created": "2019-09-24 22:11:36",
"Modified": "2019-09-24 22:11:40",
"Name": "US East"
}
}List Teams
Retrieve all teams in your account.
GET /v2/team
Example Request
curl -X GET "https://api.oktopost.com/v2/team" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Items": [
{
"Id": "025000000000001",
"Created": "2019-09-24 22:11:36",
"Modified": "2019-09-24 22:11:40",
"Name": "US East"
},
{
"Id": "025000000000002",
"Created": "2019-09-24 22:15:20",
"Modified": "2019-09-24 22:15:20",
"Name": "US West"
}
],
"Total": 2
}Create Team
Create a team in your account.
POST /v2/team
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/team" \
-u ACCOUNT_ID:API_KEY \
-d name="US West"Example Response
{
"Result": true,
"Team": {
"Id": "025000000000002",
"Created": "2020-04-24 12:11:36",
"Modified": "2020-04-24 12:11:40",
"Name": "US West"
}
}Update Team
Rename an existing team.
POST /v2/team/:teamId
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/team/025000000000001" \
-u ACCOUNT_ID:API_KEY \
-d name="US South"Example Response
{
"Result": true,
"Team": {
"Id": "025000000000001",
"Created": "2020-04-24 12:11:36",
"Modified": "2020-04-24 12:12:59",
"Name": "US South"
}
}Delete Team
Remove a team from your account.
DELETE /v2/team/:teamId
Deleting a team removes team assignments from all associated entities (users, campaigns, workflows, and boards). You can't undo this action.
Parameters
Prop
Type
Example Request
curl -X DELETE "https://api.oktopost.com/v2/team/025000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true
}List Teams for an Entity
Retrieve all teams assigned to a user, campaign, workflow, or advocacy board.
GET /v2/team-entity/:entityId
This endpoint returns at most 1,000 results and doesn't support pagination.
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/team-entity/002000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Items": [
{
"Id": "025000000000001",
"Created": "2019-09-24 22:11:36",
"Modified": "2019-09-24 22:11:40",
"Name": "US East"
},
{
"Id": "025000000000002",
"Created": "2019-09-24 22:15:20",
"Modified": "2019-09-24 22:15:20",
"Name": "US West"
}
]
}Add Teams to an Entity
Assign one or more teams to a user, campaign, workflow, or advocacy board.
POST /v2/team-entity/:entityId
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/team-entity/002000000000001" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000001,025000000000002"Example Response
{
"Result": true
}Remove Teams from an Entity
Remove one or more team assignments from an entity.
DELETE /v2/team-entity/:entityId
Parameters
Prop
Type
Example Request
curl -X DELETE "https://api.oktopost.com/v2/team-entity/002000000000001" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000001,025000000000002"Example Response
{
"Result": true
}Understanding Entity IDs
In the team-entity endpoints, the entity ID in the URL determines which resource you manage teams for:
- User ID (starts with
00A): manage team assignments for a user. - Campaign ID (starts with
002): manage team assignments for a campaign. - Workflow ID (starts with
cwf): manage team assignments for a workflow. - Board ID (starts with
brd): manage team assignments for an advocacy board.
Example: Assigning Teams to a Campaign
# Campaign ID: 002000000000001
curl -X POST "https://api.oktopost.com/v2/team-entity/002000000000001" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000001,025000000000002"Example: Checking User Team Assignments
# User ID: 00A000000000001
curl -X GET "https://api.oktopost.com/v2/team-entity/00A000000000001" \
-u ACCOUNT_ID:API_KEYUse Cases
Organize by Region
Create teams for different geographic regions and assign users and campaigns to them:
# Create regional teams
curl -X POST "https://api.oktopost.com/v2/team" \
-u ACCOUNT_ID:API_KEY \
-d name="North America"
curl -X POST "https://api.oktopost.com/v2/team" \
-u ACCOUNT_ID:API_KEY \
-d name="EMEA"
# Assign campaigns to regional teams
curl -X POST "https://api.oktopost.com/v2/team-entity/002000000000002" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000001"Department-Based Access Control
Segment resources by department to control access:
# Assign workflows to marketing team
curl -X POST "https://api.oktopost.com/v2/team-entity/cwf000000000001" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000002"
# Assign advocacy board to HR team
curl -X POST "https://api.oktopost.com/v2/team-entity/brd000000000001" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000003"Multi-Team Assignments
Assign an entity to multiple teams for cross-functional access:
# Assign campaign to both marketing and sales teams
curl -X POST "https://api.oktopost.com/v2/team-entity/002000000000001" \
-u ACCOUNT_ID:API_KEY \
-d teamIds="025000000000002,025000000000003"Best Practices
Team Structure
- Keep team names descriptive. Use clear names like "Marketing - North America" instead of abbreviations.
- Plan your hierarchy. Consider how teams map to your organizational structure.
- Limit the number of teams. Too many teams complicate management, so consolidate where possible.
Access Control
- Assign users to the right teams, so they have access to the resources they need.
- Review team assignments regularly. Audit team memberships quarterly.
- Use teams for workflows. Route approval workflows to specific teams.
Entity Management
- Use comma-separated team IDs to assign multiple teams at once.
- List an entity's teams before you remove assignments.
- Document what each team represents.
Related Endpoints
- Users: manage user accounts and assign them to teams.
- Campaigns: create campaigns and assign them to teams.
- Workflows: set up approval workflows for specific teams.
- Boards: organize employee advocacy by team.
Teams are the foundation for access control and resource organization in Oktopost. Use them to create clear boundaries and enable collaboration across your organization.