/
Contact usSee pricingStart building

    Management

    API keys
    Redirect urls
    Event logs
    Dashboard roles & permissions
    Webhooks

    Programmatic Workspace Actions

    Overview
    Limits
    Email templates
      Email template object
      Sender information object
      Prebuilt customization object
      Custom HTML customization object
      Create email template
      Get email template
      Get all email templates
      Update email template
      Delete email template
    Projects
      Project object
      Create project
      Get project
      Get all projects
      Update project
      Delete project
    Project metrics
      Metrics object
      Get project metrics
    JWT templates
      JWT template object
      Get JWT templates
      Set JWT templates
    Password strength config
      Password strength config object
      Get password strength config
      Set password strength config
    Public tokens
      Public token object
      Create public token
      Get all public tokens
      Delete public tokens
    RBAC policy
      Policy object
      Role object
      Permission object
      Resource object
      Get RBAC policy
      Set RBAC policy
    Redirect URLs
      Redirect URL object
      URL type object
      Create redirect URL
      Get redirect URL
      Get all redirect URLs
      Update redirect URL
      Delete redirect URL
    SDK config
      SMSAutofillMetadata object
      ConsumerSDKBasicConfig object
      ConsumerSDKSessionsConfig object
      ConsumerSDKMagicLinksConfig object
      ConsumerSDKOTPsConfig object
      ConsumerSDKOAuthConfig object
      ConsumerSDKTOTPsConfig object
      ConsumerSDKWebauthnConfig object
      ConsumerSDKCryptoWalletsConfig object
      ConsumerSDKDFPPAConfig object
      ConsumerSDKBiometricsConfig object
      ConsumerSDPasswordsConfig object
      ConsumerConfig object
      B2BSDKBasicConfig object
      B2BSDKSessionsConfig object
      B2BSDKMagicLinksConfig object
      B2BSDKOTPsConfig object
      B2BSDKOAuthConfig object
      B2BSDKTOTPsConfig object
      B2BSDKSSOConfig object
      B2BSDKPasswordsConfig object
      B2BConfig object
      Get Consumer SDK config
      Set Consumer SDK config
      Get B2B SDK config
      Set B2B SDK config
    Secrets
      Secret object
      CreatedSecret object
      Create secret
      Get secret
      Get all secrets
      Delete secret
Get support on SlackVisit our developer forum

Contact us

Home

/

Workspace management

/

Programmatic Workspace Actions

/

Overview

Programmatic Workspace Actions

Have feedback on the recently launched Stytch Terraform SDK? Let us know in the community Slack.
Stytch Management Go SDK icon

Stytch Management Go SDK

Manage your Stytch workspace resources with our Go SDK

Stytch Terraform Provider icon

Stytch Terraform Provider

Manage your Stytch workspace resources using Terraform

Using our Programmatic Workspace Actions requires you to first create a Workspace Management Key. These are different from API keys in that they give you access to manage your Stytch projects and project settings. They will work only for the specific set of products set up for workspace management.

To create a new Workspace Management Key, first login to the Stytch dashboard, then navigate to Workspace settings -> Management API. Click "Add new" to create a new Workspace Management Key.

Remember to save the secret somewhere secure since you won't be able to view it again. When making requests to the routes defined below, you will use HTTP Basic Authentication to authenticate your requests to your workspace. The user ID will be the Key ID and the password is the Secret.

IMPORTANT: Workspace Management Keys have access to dangerous operations within your Stytch workspace. Make sure to securely store these keys and only give access to those who need them.

The base URL for all routes is https://management.stytch.com. For example, to create a project, you would make a POST to https://management.stytch.com/v1/projects with the appropriate HTTP Body.

All client endpoints are available in an Insomnia API Collection (compatible with Postman) here (ask Stytch for permissions). An example cURL request is given below:

curl -s -X POST https://management.stytch.com/v1/projects \
		-H "Content-Type: application/json" \
		-u "workspace-key-prod-0000000-0000-0000-0000-000000000:key-secret" \
		-d '{"project_name": "Created with PWA", "vertical": "B2B}'

Now you can use either the Stytch Management Go SDK, Stytch Terraform Provider or cURL/Postman/another HTTP client to make API calls to the Stytch Management API. If using a client other than the Management Go SDK, be sure to set the following:

  • Set the header "Content-Type: application/json"
  • Use HTTP Basic Authentication with the workspace API key ID and secret you received earlier
  • Use the workspace key ID as the user_id
  • Use the workspace key secret as the password