Create labels in Forge

Hi there,

Is there a way to create custom labels via API? I would like to add custom labels in some issues.

Thank you

Hi @janambroz,

You can use the Edit issue REST API and pass a request body like this

{
    "update":
    {
        "labels":
        [
            {
                "add": "the-label-to-add"
            }
        ]
    }
}

If the label does not exist, it will be created before adding to the issue.

Cheers,
Ian

2 Likes