Sign in
Section titled “Sign in”Open sign in, enter your email and password, and choose Sign in. The app remembers your session. Use the organization picker to select the team you want to work with.
Replace the email address below, run the request, and enter your password when prompted. This example uses Python 3 to prepare the JSON body:
python3 - <<'PY' | curl https://api.str.ing/auth/login \ -H 'Content-Type: application/json' \ --data-binary @-import getpassimport json
print(json.dumps({ "email": "you@example.com", "password": getpass.getpass("Password: "),}))PYThe response includes session_token and expires_at. Set STRING_TOKEN to the
returned token and send it in the Authorization header:
curl https://api.str.ing/auth/verify \ -H "Authorization: Bearer $STRING_TOKEN"The response’s organizations array includes each organization’s slug and your
role. Use the appropriate slug in organization-scoped requests.
With the str CLI installed, authorize it for your organization:
str loginstr api /auth/whoamistr api sends the saved credential automatically. Use {org} in a path to
insert the credential’s organization slug:
str api '/{org}/functions'Automation credentials
Section titled “Automation credentials”Use a personal access token for tools acting as you, and an API key for organization automation. Organization-scoped credentials apply to one organization.
Select curl in Choose your fighter above to manage automation credentials with a signed-in session token.
List your organization’s API keys:
curl https://api.str.ing/acme/api-keys \ -H "Authorization: Bearer $STRING_TOKEN"POST /{org_slug}/api-keys creates a key; DELETE /{org_slug}/api-keys/{key_id}
revokes one. Use GET /auth/tokens, POST /auth/tokens, and
DELETE /auth/tokens/{pat_id} to manage personal access tokens.
Managing API keys and personal access tokens requires a signed-in session. Select curl above and use a session token for these requests. Your saved CLI credential remains available for function and other application API requests.
See the API specification for creation request bodies and response schemas.
Errors and sign-out
Section titled “Errors and sign-out”Choose Sign out in the navigation to end your session. If your session has expired, sign in again to continue.
A missing, expired, invalid, or revoked credential returns 401 UNAUTHENTICATED
on authenticated routes. Errors contain code and message; use code when
handling them in a script.
End your session with:
curl -X POST https://api.str.ing/auth/logout \ -H "Authorization: Bearer $STRING_TOKEN"If the saved credential is rejected, run str login again. To sign out and
remove the saved credential:
str logout