# Train and Activate Model via API

**URL:** <https://forum.rasa.com/t/train-and-activate-model-via-api/18408>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [October 4, 2019, 4:39pm UTC](https://forum.rasa.com/t/train-and-activate-model-via-api/18408 "2019-10-04T16:39:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![justyn](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@justyn](https://forum.rasa.com/u/justyn)\
**Post date:** [July 6, 2021, 5:16pm UTC](https://forum.rasa.com/t/train-and-activate-model-via-api/18408/3 "2021-07-06T17:16:11Z")

</div>

Hi @stephens

Could you elaborate a little on how you got these endpoints to work?

I’m trying to do exactly the same thing, but when I try to trigger the new training via `api/projects/default/models/jobs` I get the error `Model 'None' not found for project 'default'.`

Some more detail here:

> [@How to train model, and promote it to active, programmatically in Rasa X](http://forum.rasa.com/t/how-to-train-model-and-promote-it-to-active-programmatically-in-rasa-x/43673/6):
>
> This is my test so far to trigger new training via Rasa X using the endpoints examined from the web interface, so Rasa X will know about the new model (rather than via rasa command line). in Python (URL and PASSWORD replaced): import requests, json data = { 'username' : 'me', 'password' : '{PASSWORD}' } r = requests.post('https://URL/api/auth', data=json.dumps(data), verify=False) token = json.loads(r.text)['access\_token'] print(token) headers = { 'Authorization' : 'Bearer ' + token } r = req…

Any hints would be gratefully received, thank you!

---

_[View the full topic](https://forum.rasa.com/t/train-and-activate-model-via-api/18408)._
