# Custom Variable in API Object Repository for Headers / Body

**URL:** <https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064>\
**Category:** Feature Request\
**Tags:** feature-request, katalon-studio\
**Created:** [July 23, 2019, 12:07am UTC](https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064 "2019-07-23T00:07:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ealiaj](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@ealiaj](https://forum.katalon.com/u/ealiaj)\
**Post date:** [July 23, 2019, 12:07am UTC](https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064/1 "2019-07-23T00:07:52Z")

</div>

Can we please have the option to call variables into headers, body, it is becoming tiresome thinking of workarounds instead of just calling something from a file.

Or allow a full scripting view, to run whatever code we want before the request goes out, just like test cases.

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [July 23, 2019, 3:58am UTC](https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064/2 "2019-07-23T03:58:37Z")

</div>

Please take look:

> **[Parameterize a Web Service Object](https://docs.katalon.com/katalon-studio/docs/parameterize-a-web-service-object.html)**
>
> Starting with version 5.7, Katalon Studio provides Variables for RESTful and SOAP Web Service Test Objects. Since Katalon Studio v5.9, Variables is enhanced with a Scripting Editor. Query Parameters Query...

> **[Create Web Service Object in Script Mode](https://docs.katalon.com/katalon-studio/docs/create_web_service_object_in_script_mode.html)**
>
> Katalon Studio provides API testing capabilities with REST and SOAP services which are easily accessible through an intuitive User Interface. However, you can also create and manipulate such web service...

---

<div class="post-metadata">

**Author:** ![ealiaj](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@ealiaj](https://forum.katalon.com/u/ealiaj)\
**Post date:** [July 23, 2019, 6:49am UTC](https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064/3 "2019-07-23T06:49:07Z")

</div>

Hi I saw them and am now just writing code in test cases, but when using the UI there is no way to call variables in headers auth body through the UI builder.

The above examples just have it for parameters in the query string, please add or fix this feature.

---

<div class="post-metadata">

**Author:** ![ealiaj](https://avatars.discourse-cdn.com/v4/letter/e/13edae/32.png) [@ealiaj](https://forum.katalon.com/u/ealiaj)\
**Post date:** [July 23, 2019, 4:50pm UTC](https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064/4 "2019-07-23T16:50:58Z")

</div>

@devalex88 You can close this it was a race condition causing it to fail can call variables in other section of the GUI

---

<div class="post-metadata">

**Author:** ![albert.vu](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/albert.vu/32/20595_2.png) [@albert.vu](https://forum.katalon.com/u/albert.vu)\
**Post date:** [August 8, 2022, 7:43am UTC](https://forum.katalon.com/t/custom-variable-in-api-object-repository-for-headers-body/30064/5 "2022-08-08T07:43:14Z")

</div>


