Yes i have tried but my first request is post so i need to pass the content type but the second is GET it doesn’t need content type so my application is throwing 500 as error
#Assertions
Status Should Be 200
Log To Console ${response.status_code}
#Should Be Equal ${response.json()}[destinations][0][status] INPROGRESS
Log To Console ${response.content}
Log To Console ${response.json()}[messageId]
#Log To Console ${response.json()}[status]
# Log response and fetch status via GET
${header}= Create Dictionary Account-Sid=${Account-Sid} Api-Key=${Api-Key} Api-Secret=${Api-Secret}
${response}= GET On Session sms ${base_url}/sms/${response.json()}[messageId]
You could try a Wait Until Keyword Succeeds to just repeat your GET request until it is successful.
A hard coded sleep also works, but this is something I typically avoid.
By the way:
Here is also some example REST API tests where the requests are connected.
Create a Booking at Restful Booker
${booking_dates} Create Dictionary checkin=2022-12-31 checkout=2023-01-01
${body} Create Dictionary firstname=Hans lastname=Gruber totalprice=200 depositpaid=false bookingdates=${booking_dates}
${response} POST url=https://restful-booker.herokuapp.com/booking json=${body}
${id} Set Variable ${response.json()}[bookingid]
${response} GET https://restful-booker.herokuapp.com/booking/${id}
Here you can also see hot a id variable is read from the response.
And afterwards the ${id} variable is used for another GET request.