Create a user
  • 01 Oct 2024
  • 1 Minute to read
  • Contributors

Create a user


Article summary

Post
/users

Creates a new user. This endpoint can only be used to create Tulip Operators.

Requires the users:write API key scope.

Security
HTTP
Type basic

A Tulip API key is required to use the Tulip API. API key authentication uses HTTP Basic Authentication as defined by RFC 7617. HTTP Basic Authentication uses a generic username/password scheme to authenticate. For Tulip API requests, the password should be the API key's associated secret. The username should have the format {type}.{version}_{id}, where {type} is the API key type, {version} is the type's version number, and {id} is the id of the key. Tulip API keys currently are one of two types:

  • apikey.2 - user API keys provisioned by creating a Tulip API Token. The key id is the token id.
  • onetime.1 - temporary API keys provisioned using the /auth/temporary endpoint or using the One-Time API Key page. These keys are only valid for 30 seconds after provisioning.

Once you have determined the username and password you need to use, the Authorization header should be set to the value Basic {credentials}, where {credentials} is the base64-encoded value of the string {username}:{password}. See RFC 7617 for more details of this encoding.

Body parameters

The spec for creating a user.

object
role
string Required
Valid values[ "operator" ]
name
string Required
Min length1
Max length200
badge_id
string Required
Min length1
Max length200
Responses
201

The user was created successfully. The details of the created user are returned in the response.

id
string
Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
createdAt
string (date-time)
createdBy
string
Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
updatedAt
string (date-time)
updatedBy
string
Pattern^[a-zA-Z0-9_]+$
Exampleg56RCoZCtzv7borvp
role
string
Valid values[ "owner", "workspace-owner", "admin", "shop-floor-admin", "connectors-admin", "tables-admin", "apps-admin", "apps-builder-admin", "apps-approver-admin", "shop-floor-operator", "viewer-with-player", "viewer", "operator-with-registration", "operator" ]
name
string
email
string (email)
OneOf
object
badge_id
string
object
username
string
400

The request was malformed. This could mean that headers, query parameters, or the request body was unable to be parsed or had unexpected values.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
401

The request was made unauthorized. HTTP Basic Authorization using a Tulip API Key is required for use of the API.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
errorCode
Valid values[ "AuthenticationRequired" ]
403

The provided authentication info was rejected. The response will provide additional details.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
errorCode
Valid values[ "AuthenticationFailed" ]
422

The limit for this asset has been reached.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string
500

The server encountered an unexpected error.

object
errorCode
string
errorUniqueID
string
Pattern^[a-zA-Z0-9+/]+$
Exampleaq21mSKC1rbO87TjC/4Hz2EJHd/v+jxf7MtC315vo0Y
details
string

Was this article helpful?