openapi: 3.1.0
info:
title: emnify REST subpackage_applicationTokens subpackage_passwordManagementAndActivation API
version: 1.0.0
description: 'The emnify REST API gives programmatic access to the emnify IoT SuperNetwork — global cellular connectivity for IoT devices. Manage SIMs, endpoints (devices), service and tariff profiles, events, SMS, eSIM (SGP.32) profiles, organizations, users, API callbacks, and the Data Streamer. Authenticate with application tokens or user credentials; tokens are short-lived JWTs.
Source: emnify developer documentation (https://docs.emnify.com/developers/api). This spec is assembled from the per-operation OpenAPI fragments published in the emnify llms-full.txt feed.'
contact:
name: emnify Developer Support
url: https://docs.emnify.com/developers
license:
name: Proprietary
url: https://www.emnify.com/legal
servers:
- url: https://cdn.emnify.net
description: emnify REST API base host
security:
- BearerAuth: []
tags:
- name: subpackage_passwordManagementAndActivation
x-display-name: Passwordmanagementandactivation
paths:
/api/v1/user/activation:
post:
operationId: user-activation-post
summary: Activate user
description: "Activates the user account and sets a password.\nThe activation key is sent via email.\n\n\n This is a public (unauthenticated) service which ignores auth tokens.\n\n"
tags:
- subpackage_passwordManagementAndActivation
responses:
'204':
description: The server has successfully fulfilled the request and that there is no additional content to send in the response payload body
content:
application/json:
schema:
type: object
properties: {}
'400':
description: ''
content:
application/json:
schema:
description: Any type
requestBody:
content:
application/json:
schema:
type: object
properties:
activationKey:
type: string
password:
type: string
required:
- activationKey
- password
/api/v1/user/activation_resend:
post:
operationId: user-activation-resend-post
summary: Resend user activation email
description: "Re-sends activation mail to the user.\n\nAs this endpoint is open to the public (no authentication token necessary), it requires instead the google reCAPTCHA token to ensure that no robot is performing the request.\nMoreover, there's a time limit on how often a given user may be issued with a new activation mail.\n\n\n According to the [reCAPTCHA documentation](https://developers.google.com/recaptcha/docs/display) a \"Site Key\" is necessary.\n If you want to implement this feature in your client, please contact emnify support to obtain this \"Site Key\" for your domain.\n\n"
tags:
- subpackage_passwordManagementAndActivation
responses:
'204':
description: The server has successfully fulfilled the request and that there is no additional content to send in the response payload body
content:
application/json:
schema:
type: object
properties: {}
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
g-recaptcha-response:
type: string
description: 'Auto-generated from a form using Google reCAPTCHA.
'
required:
- username
- g-recaptcha-response
/api/v1/user/password:
patch:
operationId: user-password-patch
summary: Change password
description: "Changes the password for the currently authenticated user.\n\n\n The client application should invalidate the authentication token.\n\n"
tags:
- subpackage_passwordManagementAndActivation
parameters:
- name: Authorization
in: header
description: 'An `auth_token` should be provided to authenticate a session.
To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).
'
required: true
schema:
type: string
responses:
'204':
description: The server has successfully fulfilled the request and that there is no additional content to send in the response payload body
content:
application/json:
schema:
type: object
properties: {}
'422':
description: See HTTP response body for details.
content:
application/json:
schema:
$ref: '#/components/schemas/UserPasswordPatchRequestUnprocessableEntityError'
requestBody:
content:
application/json:
schema:
type: object
properties:
old_password:
type: string
new_password:
type: string
required:
- old_password
- new_password
/api/v2/user/invitation:
post:
operationId: user-v-2-invitation
summary: Invite a user
description: 'Invite a user to a Workspace by specifying username and the roles that the user will have in the organization.
This user is created and a `User invited` event is sent.
There is no additional action such as an email sent.
The following fields may be provided:
- `username` (String) - Email of the invited user
- `name` (String) - Name of the invited user
- `organisation` (Object) - Defaults to the default Workspace of the requesting user
- `roles` (Array) - Assigns the **Administrator** role by default
If the invited user doesn''t exist, a new user is created and the `organisation.id` is their default Workspace.
If the invited user already exists, the user is assigned to the Workspace.
This fails if the Workspace feature isn''t enabled on the target organization''s tariff plan.
'
tags:
- subpackage_passwordManagementAndActivation
parameters:
- name: Authorization
in: header
description: 'An `auth_token` should be provided to authenticate a session.
To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).
'
required: true
schema:
type: string
responses:
'201':
description: User created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Password Management and Activation_UserV2Invitation_Response_201'
'400':
description: 'Some of the given parameters have invalid values, detailed description will be given in the response
'
content:
application/json:
schema:
description: Any type
'403':
description: 'Current logged in user is not permitted to invite users.
'
content:
application/json:
schema:
description: Any type
'409':
description: 'There is already an active user with the same username, so this cannot be taken
'
content:
application/json:
schema:
description: Any type
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
name:
type: string
organisation:
$ref: '#/components/schemas/ApiV2UserInvitationPostRequestBodyContentApplicationJsonSchemaOrganisation'
roles:
type: array
items:
$ref: '#/components/schemas/ApiV2UserInvitationPostRequestBodyContentApplicationJsonSchemaRolesItems'
required:
- username
- name
components:
schemas:
Password Management and Activation_UserV2Invitation_Response_201:
type: object
properties:
id:
type: number
format: double
username:
type: string
name:
type: string
organisation:
$ref: '#/components/schemas/ApiV2UserInvitationPostResponsesContentApplicationJsonSchemaOrganisation'
roles:
type: array
items:
$ref: '#/components/schemas/ApiV2UserInvitationPostResponsesContentApplicationJsonSchemaRolesItems'
title: Password Management and Activation_UserV2Invitation_Response_201
ApiV2UserInvitationPostRequestBodyContentApplicationJsonSchemaRolesItems:
type: object
properties:
id:
type: integer
title: ApiV2UserInvitationPostRequestBodyContentApplicationJsonSchemaRolesItems
ApiV2UserInvitationPostRequestBodyContentApplicationJsonSchemaOrganisation:
type: object
properties:
id:
type: integer
title: ApiV2UserInvitationPostRequestBodyContentApplicationJsonSchemaOrganisation
ApiV2UserInvitationPostResponsesContentApplicationJsonSchemaRolesItems:
type: object
properties:
id:
type: number
format: double
name:
type: string
title: ApiV2UserInvitationPostResponsesContentApplicationJsonSchemaRolesItems
UserPasswordPatchRequestUnprocessableEntityError:
type: object
properties:
error_code:
type: integer
error_token:
type: string
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/ApiV1UserPasswordPatchResponsesContentApplicationJsonSchemaErrorsItems'
title: UserPasswordPatchRequestUnprocessableEntityError
ApiV2UserInvitationPostResponsesContentApplicationJsonSchemaOrganisation:
type: object
properties:
id:
type: number
format: double
title: ApiV2UserInvitationPostResponsesContentApplicationJsonSchemaOrganisation
ApiV1UserPasswordPatchResponsesContentApplicationJsonSchemaErrorsItems:
type: object
properties: {}
title: ApiV1UserPasswordPatchResponsesContentApplicationJsonSchemaErrorsItems
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'Retrieve a JWT via POST /api/v1/authenticate using an application_token or user credentials, then send it as `Authorization: Bearer `.'