Create Tag

This end point is use for create tag

[POST] /ruangkerja/tags

Information

This API is a function for create new tag.

Headers

NameTypeExampleRequiredDescription
Authorizationstringaccess_tokenYESToken of authentication. Get from Authentication API
Acceptstringapplication/jsonYESDefines the message format that is expected by the client
Content-Typestringapplication/jsonYESDefines the message format of the request body that is sent by the client

Parameter

NameTypeRequiredLocationDescription
namestringYESbodyName of tag

Example cURL Request

curl --location --request POST 'https://api.ruangkerja.id/ruangkerja/tags' \
--header 'Authorization: access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Training Batch New"
}'

Example Success Response

{
    "status": "success",
    "message": "Success",
    "data": {
        "serial": "RUKRTAG-YERDFHRB"
    }
}

Example Failed Response

{
    "errorCode": 11101,
    "message": "TAG_NAME_EXISTS",
    "detail": "tag name already been taken"
}

See also: Error Dictionary.