Skip to content

MT-20212: Add API to manage API Tokens#20

Open
mklocek wants to merge 1 commit intomainfrom
MT-20212-accepted-input-api-endpoint-to-create-tokens-whitelisting-for-third-party-customers-case
Open

MT-20212: Add API to manage API Tokens#20
mklocek wants to merge 1 commit intomainfrom
MT-20212-accepted-input-api-endpoint-to-create-tokens-whitelisting-for-third-party-customers-case

Conversation

@mklocek
Copy link
Contributor

@mklocek mklocek commented Mar 6, 2026

Changes

  • Add API to manage API Tokens

@mklocek mklocek marked this pull request as ready for review March 6, 2026 15:26
Comment on lines +1339 to +1342
access_level:
type: integer
enum: [10, 100]
description: 10 = viewer, 100 = admin.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the point of the user, wouldn't it be better to just pass viewer/admin as a string? We could parse it to number of our side

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree string would be more user friendly. We return a number in get response though so I think at least it's consistent between get/post requests AND it's also consistent with other endpoint we already have: https://docs.mailtrap.io/developers/account-management/access-control

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah forgot about access endpoints. So maybe this could be idea for v3 :)

@mklocek mklocek requested a review from piobeny March 9, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants