I can't send details param in rest api
Asked by Bruno Willian Conke das Neves:

This is my request:

```
curl --location 'myUrl' \
--header 'X-OpsGenie-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--header 'Cookie: __cf_bm=ckl61dMKQWxlJnqbN241pQyu9qXIkROu.21cQCTCVa0-1709231789-1.0-AYSDGyb3aGOTAsSRTDa9XleOUXhK7YYys+QjJxzM+w1EK7QtgNAgwoBJx0aH7wEvDjHW/434zuKihOuD3HVAeCk=' \
--data '{
"description":"test description",
"details":{"key1":"value1","key2":"value2"},
"source":"contrel",
"message":"test",
"priority":"P3",
"isExtraPropertiesWithKey": "true"
}'
```

I'm using the documentation as a reference:  
<https://docs.opsgenie.com/docs/alert-api#create-alert>

This is result:

![error.png](/t5/image/serverpage/image-id/309494i1A0F6E31FAFED5C3/image-size/large?v=v2&px=999 "error.png")

what is wrong?


Answers:
author: Nick H
body: Hi [@Bruno Willian Conke das Neves](/t5/user/viewprofilepage/user-id/5441929) ,

The JSON body (which looks correct) you shared compared to the screenshot looks to be a for different alert?

I would check the [Logs tab](https://support.atlassian.com/opsgenie/docs/search-logs/) to see if the request was received by Opsgenie. If the request was received - but an alert was not created - then this Community post should help troubleshoot why that did not occur:

[Integration not creating Opsgenie alert](https://community.atlassian.com/t5/Opsgenie-articles/Integration-not-creating-Opsgenie-alert/ba-p/2070678)

If that JSON body is for the alert you shared, I would review the alert's [Activity log tab](https://support.atlassian.com/opsgenie/docs/track-user-events/#Alert-Activity-Logs) to see if some sort of [alert policy](https://support.atlassian.com/opsgenie/docs/create-and-manage-global-alert-policies/) is applying to the alert and modifying the fields such as the details (aka extra properties).

Again, the body you shared looks correct.

comments: author: Bruno Willian Conke das Neves
body: Hi,

<br />

The json is the same structure as the alert, I just change some values.

I saw the logs and it looks like everything was created correctly.

![erro2.png](https://community.atlassian.com/t5/image/serverpage/image-id/309500i00DA1B90409137A7/image-size/large?v=v2&px=999 "erro2.png")


author: Nick H
body: Is there any chance of sharing the actual JSON and not just the structure?

If not - I would suggest reaching out to [Opsgenie support](https://support.atlassian.com/opsgenie/) so they can take a deeper look into your instance and review why the details are not being added through the alert API.


author: Bruno Willian Conke das Neves
body: Here is the real json used

```
{
"description":"S? sei que nada sei, por isso errei.",
"details":{"key1":"value1","key2":"value2"},
"source":"contrel",
"message":"Teste Titulo do erro",
"priority":"P3",
"isExtraPropertiesWithKey": "true"
}
```

and here is the complete Curl
>
> ```
> curl --location 'myurl' \
> --header 'X-OpsGenie-Key: mykey' \
> --header 'Content-Type: application/json' \
> --data '{
> "description":"S? sei que nada sei, por isso errei.",
> "details":{"key1":"value1","key2":"value2"},
> "source":"contrel",
> "message":"Teste Titulo do erro",
> "priority":"P3",
> "isExtraPropertiesWithKey": "true"
> }'
> ```


author: Nick H
body: Hi Bruno,

Thank you for sharing that.

Testing in Postman with the same body shared above, I created an alert as expected with the details (extra properties) added as expected:

![alertapi1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/309504iC6B36B2E5E3CE7A5/image-size/large?v=v2&px=999 "alertapi1.jpg")![alertapi2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/309503iCA0231E400470917/image-size/large?v=v2&px=999 "alertapi2.jpg")

One thing I would suggest also reviewing is the create alert action being used for this alert in the API integration. Maybe the action is wiping the extra properties at creation, and should at the very least have this configured to dynamically parse those fields / values:

![alertapi3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/309506i254A023174398CC8/image-size/large?v=v2&px=999 "alertapi3.jpg")

Otherwise [Opsgenie support](https://support.atlassian.com/opsgenie/) should be able to assist further.


author: Bruno Willian Conke das Neves
body: Hi Nick,

That was it, thank you very much.


Tags: cloud