V3 REFERENCE API Configuration

/apikeyaccess

Access rights description on API keys for subaccounts/users.

List apikeyaccess resources available for this apikey, use a GET request. Alternatively, you may want to add one or more filters.

# list apikeyaccess resources

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/apikeyaccess
Properties
Name Description
AllowedAccess JSON describing access rights.
  • [ Type AnsiString ]
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
CustomName Custom name for this set of rights.
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsActive Is this object active (rights enforced) or not.
  • [ Type Boolean ]
LastActivityAt Timestamp of last registered activity for this API Key.
  • [ Type TRFC3339DateTime ]
RealUserID
OR
RealUserALT
RealUserID
ID reference to User
RealUserALT
Value of the Email field of the related User resource
  • [ Type TUser ]
Subaccount Reference to subaccount.
  • [ Type TSubAccount ]
UserID
OR
UserALT
UserID
ID reference to User
UserALT
Value of the Email field of the related User resource
  • Mandatory
  • [ Type TUser ]
Filters
Name Description
APIKey Only retrieve apikeyaccess resources for which APIKey ID equals the specified value.
  • [ Type Int64 ]
IsActive Only show APIKeyAccess resources for which IsActive equals the specified value.
  • [ Type TBooleanFilter ]
RealUser Only retrieve apikeyaccess resources for which RealUser ID equals the specified value.
  • [ Type Int64 ]
SubAccount Only retrieve apikeyaccess resources for which SubAccount ID equals the specified value.
  • [ Type Int64 ]
Token Only show APIKeyAccess resources for which Token equals the specified value.
  • [ Type AnsiString ]
User Only retrieve apikeyaccess resources for which User ID equals the specified value.
  • [ Type Int64 ]

Access a given apikeyaccess resource, use a GET request, providing the apikeyaccess's ID value.

# access the apikeyaccess resource identified by $ID

curl -s -X GET \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/apikeyaccess/$ID

    
    
Properties
Name Description
AllowedAccess JSON describing access rights.
  • [ Type AnsiString ]
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
CustomName Custom name for this set of rights.
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsActive Is this object active (rights enforced) or not.
  • [ Type Boolean ]
LastActivityAt Timestamp of last registered activity for this API Key.
  • [ Type TRFC3339DateTime ]
RealUserID
OR
RealUserALT
RealUserID
ID reference to User
RealUserALT
Value of the Email field of the related User resource
  • [ Type TUser ]
Subaccount Reference to subaccount.
  • [ Type TSubAccount ]
UserID
OR
UserALT
UserID
ID reference to User
UserALT
Value of the Email field of the related User resource
  • Mandatory
  • [ Type TUser ]

Add a new apikeyaccess resource with a POST request.

# add a new apikeyaccess resource, beware of the Read Only fields!

curl -s -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/apikeyaccess \
-H 'Content-Type: application/json' \
-d '{"AllowedAccess": ...}'
Properties
Name Description
AllowedAccess JSON describing access rights.
  • [ Type AnsiString ]
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
CustomName Custom name for this set of rights.
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsActive Is this object active (rights enforced) or not.
  • [ Type Boolean ]
LastActivityAt Timestamp of last registered activity for this API Key.
  • [ Type TRFC3339DateTime ]
RealUserID
OR
RealUserALT
RealUserID
ID reference to User
RealUserALT
Value of the Email field of the related User resource
  • [ Type TUser ]
Subaccount Reference to subaccount.
  • [ Type TSubAccount ]
UserID
OR
UserALT
UserID
ID reference to User
UserALT
Value of the Email field of the related User resource
  • Mandatory
  • [ Type TUser ]

Update one specific apikeyaccess resource with a PUT request, providing the apikeyaccess's ID value. Be sure to include all the mandatory properties.

# update content of resource apikeyaccess identified by ID $ID

curl -s -X PUT \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/apikeyaccess/$ID \
-H 'Content-Type: application/json' \
-d '{"AllowedAccess": ...}'

    
Properties
Name Description
AllowedAccess JSON describing access rights.
  • [ Type AnsiString ]
APIKeyID
OR
APIKeyALT
APIKeyID
ID reference to APIKey
APIKeyALT
Value of the APIKey field of the related APIKey resource
  • Mandatory
  • [ Type TAPIKey ]
CreatedAt Timestamp when object was created in database.
  • [ Type TRFC3339DateTime ]
CustomName Custom name for this set of rights.
  • [ Type AnsiString ]
ID Unique numerical ID for this object.
  • Read Only
  • [ Type Int64 ]
IsActive Is this object active (rights enforced) or not.
  • [ Type Boolean ]
LastActivityAt Timestamp of last registered activity for this API Key.
  • [ Type TRFC3339DateTime ]
RealUserID
OR
RealUserALT
RealUserID
ID reference to User
RealUserALT
Value of the Email field of the related User resource
  • [ Type TUser ]
Subaccount Reference to subaccount.
  • [ Type TSubAccount ]
UserID
OR
UserALT
UserID
ID reference to User
UserALT
Value of the Email field of the related User resource
  • Mandatory
  • [ Type TUser ]

Remove one given apikeyaccess resource with a DELETE request, providing the apikeyaccess's ID value.

# delete resource apikeyaccess with ID $ID

curl -s -X DELETE \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/apikeyaccess/$ID